#/usr/bin/env python
#-*-coding:utf-8-*-

class Data(object):
    def __init__(self):
        self.comments = []
        self.videos = []
        video_path = "/data/download/no_comment_video.csv"
        self.comments = self.load_comments("./data/all_comment.csv")
        self.videos = self.load_video(video_path)


    def load_comments(self, path):
        comments = []
        with open(path) as f:
            for _, line in enumerate(f):
                line = line.strip("\n").strip()
                if not line:
                    continue
                comments.append(line)
        return comments

    def load_video(self, path):
        videos = []
        with open(path) as f:
            f.readline()
            for _, line in enumerate(f):
                line = line.strip("\n").strip()
                video = line.split("\t")
                videos.append(video)
        return videos
